from openpyxl import load_workbook

workbook = load_workbook(filename='py_text.xlsx')
sheet = workbook.active
'''
sheet['B7'] = 'hello guys'
workbook.save(filename='py_text.xlsx')
'''

'''
data = [
    ['tommy', 1],
    ['holy', 2],
    ['hell', 3]
]
for row in data:
    sheet.append(row)
workbook.save(filename='py_text.xlsx')
'''

for rows in sheet.iter_rows(min_row=8, max_row=10, min_col=1, max_col=2):
    print(rows)
    data = []
    for cell in rows:
        # data = [cell.value]
        data.append(cell.value)
    print(data)
    sheet.append(data)

workbook.save(filename='py_text.xlsx')

# workbook.create_sheet() workbook.sheetnames || workbook.copy_worksheet(sheet)
# sheet.move_range('C1:D4', rows=2, cols=-2) || sheet insert_cols insert_rows delete_rows
# sheet.freeze_panes 冻结窗格
